package alf.mapping.dto.maps;

public class NavigationLink {
	public static final String SEPARATOR = "/";
	Room diagram;
	Item item;

	public NavigationLink() {
		super();
	}
	
	public NavigationLink(Room d, Item i){
		super();
		this.diagram = d;
		this.item = i;
	}
	
	public NavigationLink clone(){
		NavigationLink value = new NavigationLink();
		value.setDiagram(this.diagram);
		value.setItem(this.getItem());
		return value;
	}
	
	public void setItem(Item item) {
		this.item = item;
	}

	public Item getItem() {
		return item;
	}

	public void setDiagram(Room diagram) {
		this.diagram = diagram;
	}

	public Room getDiagram() {
		return diagram;
	}
	
	public String toString() {
		StringBuffer b = new StringBuffer();
		if (diagram != null) {
			b.append(diagram.getName());
		}
		b.append(SEPARATOR);
		if (item != null) {
			b.append(item.getName());
		}
		return b.toString();
	}
}
